package com.woniu.smallmedical.mapper;

import com.woniu.smallmedical.entity.StorageMedicine;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StoragemedicineMapper {



    //分页查所有药
    List<StorageMedicine> selectAll(@Param("pageIndex") Integer pageIndex,
                                   @Param("pageSize") Integer pageSize);
    //查询所有条数
    int selectcount();
    //增加药品
    void insertmessagess(Integer smid, String number, String name, String factory, Integer count,String unit, Double purchase, Double retail,Double allpurchase, Double allretail, Integer stid);

    //通过id查
    List<StorageMedicine> selectByIds(int stid);
    //修改药品
    void updeate(Integer count,Double purchase,Double retail,Integer smid);
    //通过单号查询药品售价总数
    Double selectAllpurchase(String number);

    //通过单号查询药品售价总数
    Double selectAllretial(String number);

    //通过名字查询药品售价总数
    Double selectAllpurchases(String name);
    //通过名字查询药品售价总数
    Double selectAllretials(String name);
    //通过名字查询药品总数
    Integer selectAllcount(String name);
    //根据ID查name
    StorageMedicine selectSmid(Integer smid);
    //修改总价
     void  UpdatALLSmid(Double allpurchase,Double allretail ,Integer smid);
    //根据sit查总价
    Double  selectStidAllpurchase(String number);
    //根据sit查总价
    Double  selectStidAllretail(String number);
}
